<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-model修饰符</title>
  <script src="../vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- 清除首尾空格 -->
    <input v-model.trim="username" type="text" name="" id="">
    <!-- 转数字 -->
    <input v-model.number="age" type="text" name="" id="">
  </div>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        username: '',
        age: ''
      }
    })
  </script>
</body>

</html>